<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class WSDLInterpreter</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class WSDLInterpreter</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The main class for handling WSDL interpretation</p>
<p class="description"><p>The WSDLInterpreter is utilized for the parsing of a WSDL document for rapid  and flexible use within the context of PHP 5 scripts.</p><p>Example Usage:  <div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-inc">require_once&nbsp;</span><span class="src-str">'WSDLInterpreter.php'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$myWSDLlocation&nbsp;</span>=&nbsp;<span class="src-str">'http://www.example.com/ExampleService?wsdl'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$wsdlInterpreter&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../WSDLInterpreter/WSDLInterpreter.html">WSDLInterpreter</a></span><span class="src-sym">(</span><span class="src-var">$myWSDLlocation</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$wsdlInterpreter</span><span class="src-sym">-&gt;</span><a href="../WSDLInterpreter/WSDLInterpreter.html#methodsavePHP">savePHP</a><span class="src-sym">(</span><span class="src-str">'/example/output/directory/'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></div></p></p>
		<p class="notes">
			Located in <a class="field" href="_WSDLInterpreter.php.html">/WSDLInterpreter.php</a> (line <span class="field"><a href="../__filesource/fsource_WSDLInterpreter__WSDLInterpreter.php.html#a60">60</a></span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>



	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
																																																																<div class="var-title">
					<span class="var-type">array</span>
					<a href="#$_classmap" title="details" class="var-name">$_classmap</a>
				</div>
																<div class="var-title">
					<span class="var-type">array</span>
					<a href="#$_classPHPSources" title="details" class="var-name">$_classPHPSources</a>
				</div>
																<div class="var-title">
					<span class="var-type">SoapClient</span>
					<a href="#$_client" title="details" class="var-name">$_client</a>
				</div>
																<div class="var-title">
					<span class="var-type">DOMDocument</span>
					<a href="#$_dom" title="details" class="var-name">$_dom</a>
				</div>
																<div class="var-title">
					<span class="var-type">array</span>
					<a href="#$_servicePHPSources" title="details" class="var-name">$_servicePHPSources</a>
				</div>
																<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$_wsdl" title="details" class="var-name">$_wsdl</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																																				
												<div class="method-definition">
											<span class="method-result">WSDLInterpreter</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$wsdl</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#savePHP" title="details" class="method-name">savePHP</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$outputDirectory</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#_generateClassPHP" title="details" class="method-name">_generateClassPHP</a>
											(<span class="var-type">DOMElement</span>&nbsp;<span class="var-name">$class</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#_generateServiceFunctionPHP" title="details" class="method-name">_generateServiceFunctionPHP</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$functionName</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$functionNodeList</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#_generateServicePHP" title="details" class="method-name">_generateServicePHP</a>
											(<span class="var-type">DOMElement</span>&nbsp;<span class="var-name">$service</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#_loadClasses" title="details" class="method-name">_loadClasses</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#_loadServices" title="details" class="method-name">_loadServices</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#_validateClassName" title="details" class="method-name">_validateClassName</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$className</span>, [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$addToClassMap</span> = <span class="var-default">true</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#_validateNamingConvention" title="details" class="method-name">_validateNamingConvention</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#_validateType" title="details" class="method-name">_validateType</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span>)
									</div>
								</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="var$_classmap" id="$_classmap"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$_classmap</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number"><a href="../__filesource/fsource_WSDLInterpreter__WSDLInterpreter.php.html#a88">88</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Array of classes and members representing the WSDL message types</p>
	<ul class="tags">
				<li><span class="field">access:</span> private</li>
			</ul>
	
	
		
		

</div>
<a name="var$_classPHPSources" id="$_classPHPSources"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$_classPHPSources</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number"><a href="../__filesource/fsource_WSDLInterpreter__WSDLInterpreter.php.html#a95">95</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Array of sources for WSDL message classes</p>
	<ul class="tags">
				<li><span class="field">access:</span> private</li>
			</ul>
	
	
		
		

</div>
<a name="var$_client" id="$_client"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">SoapClient</span>
			<span class="var-name">$_client</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number"><a href="../__filesource/fsource_WSDLInterpreter__WSDLInterpreter.php.html#a74">74</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">A SoapClient for loading the WSDL</p>
	<ul class="tags">
				<li><span class="field">access:</span> private</li>
			</ul>
	
	
		
		

</div>
<a name="var$_dom" id="$_dom"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">DOMDocument</span>
			<span class="var-name">$_dom</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number"><a href="../__filesource/fsource_WSDLInterpreter__WSDLInterpreter.php.html#a81">81</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">DOM document representation of the wsdl and its translation</p>
	<ul class="tags">
				<li><span class="field">access:</span> private</li>
			</ul>
	
	
		
		

</div>
<a name="var$_servicePHPSources" id="$_servicePHPSources"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$_servicePHPSources</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number"><a href="../__filesource/fsource_WSDLInterpreter__WSDLInterpreter.php.html#a102">102</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Array of sources for WSDL services</p>
	<ul class="tags">
				<li><span class="field">access:</span> private</li>
			</ul>
	
	
		
		

</div>
<a name="var$_wsdl" id="$_wsdl"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$_wsdl</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number"><a href="../__filesource/fsource_WSDLInterpreter__WSDLInterpreter.php.html#a67">67</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The WSDL document's URI</p>
	<ul class="tags">
				<li><span class="field">access:</span> private</li>
			</ul>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>

<a name="method__construct" id="__construct"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number"><a href="../__filesource/fsource_WSDLInterpreter__WSDLInterpreter.php.html#a111">111</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Parses the target wsdl and loads the interpretation into object members</p>
	<ul class="tags">
				<li><span class="field">todo:</span> Create plug in model to handle extendability of WSDL files</li>
				<li><span class="field">throws:</span> WSDLInterpreterException Container for all WSDL interpretation problems</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">WSDLInterpreter</span>
		<span class="method-name">
			__construct
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$wsdl</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$wsdl</span><span class="var-description">: the URI of the wsdl to interpret</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsavePHP" id="savePHP"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">savePHP</span> (line <span class="line-number"><a href="../__filesource/fsource_WSDLInterpreter__WSDLInterpreter.php.html#a534">534</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Saves the PHP source code that has been loaded to a target directory.</p>
<p class="description"><p>Services will be saved by their validated name, and classes will be included  with each service file so that they can be utilized independently.</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> array of source code files that were written out</li>
				<li><span class="field">todo:</span> Add split file options for more efficient output</li>
				<li><span class="field">throws:</span> WSDLInterpreterException problem in writing out service sources</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			savePHP
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$outputDirectory</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$outputDirectory</span><span class="var-description">: the destination directory for the source code</span>			</li>
				</ul>
		
			
	</div>
<a name="method_generateClassPHP" id="_generateClassPHP"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">_generateClassPHP</span> (line <span class="line-number"><a href="../__filesource/fsource_WSDLInterpreter__WSDLInterpreter.php.html#a270">270</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Generates the PHP code for a WSDL message type class representation</p>
<p class="description"><p>This gets a little bit fancy as the magic methods __get and __set in  the generated classes are used for properties that are not named  according to PHP naming conventions (e.g., &quot;MY-VARIABLE&quot;).  These  variables are set directly by SoapClient within the target class,  and could normally be retrieved by $myClass-&gt;{&quot;MY-VARIABLE&quot;}.  For  convenience, however, this will be available as $myClass-&gt;MYVARIABLE.</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> the php source code for the message type class</li>
				<li><span class="field">todo:</span> Include any applicable annotation from WSDL</li>
				<li><span class="field">access:</span> private</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			_generateClassPHP
		</span>
					(<span class="var-type">DOMElement</span>&nbsp;<span class="var-name">$class</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">DOMElement</span>
				<span class="var-name">$class</span><span class="var-description">: the interpreted WSDL message type node</span>			</li>
				</ul>
		
			
	</div>
<a name="method_generateServiceFunctionPHP" id="_generateServiceFunctionPHP"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">_generateServiceFunctionPHP</span> (line <span class="line-number"><a href="../__filesource/fsource_WSDLInterpreter__WSDLInterpreter.php.html#a465">465</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Generates the PHP code for a WSDL service operation function representation</p>
<p class="description"><p>The function code that is generated examines the arguments that are passed and  performs strict type checking against valid argument combinations for the given  function name, to allow for overloading.</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> the php source code for the function</li>
				<li><span class="field">todo:</span> Include any applicable annotation from WSDL</li>
				<li><span class="field">access:</span> private</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			_generateServiceFunctionPHP
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$functionName</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$functionNodeList</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$functionName</span><span class="var-description">: the php function name</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$functionNodeList</span><span class="var-description">: array of DOMElement interpreted WSDL function nodes</span>			</li>
				</ul>
		
			
	</div>
<a name="method_generateServicePHP" id="_generateServicePHP"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">_generateServicePHP</span> (line <span class="line-number"><a href="../__filesource/fsource_WSDLInterpreter__WSDLInterpreter.php.html#a372">372</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Generates the PHP code for a WSDL service class representation</p>
<p class="description"><p>This method, in combination with generateServiceFunctionPHP, create a PHP class  representation capable of handling overloaded methods with strict parameter  type checking.</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> the php source code for the service class</li>
				<li><span class="field">todo:</span> Include any applicable annotation from WSDL</li>
				<li><span class="field">access:</span> private</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			_generateServicePHP
		</span>
					(<span class="var-type">DOMElement</span>&nbsp;<span class="var-name">$service</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">DOMElement</span>
				<span class="var-name">$service</span><span class="var-description">: the interpreted WSDL service node</span>			</li>
				</ul>
		
			
	</div>
<a name="method_loadClasses" id="_loadClasses"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">_loadClasses</span> (line <span class="line-number"><a href="../__filesource/fsource_WSDLInterpreter__WSDLInterpreter.php.html#a230">230</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Loads classes from the translated wsdl document's message types</p>
	<ul class="tags">
				<li><span class="field">access:</span> private</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			_loadClasses
		</span>
				()
			</div>
	
		
			
	</div>
<a name="method_loadServices" id="_loadServices"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">_loadServices</span> (line <span class="line-number"><a href="../__filesource/fsource_WSDLInterpreter__WSDLInterpreter.php.html#a332">332</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Loads services from the translated wsdl document</p>
	<ul class="tags">
				<li><span class="field">access:</span> private</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			_loadServices
		</span>
				()
			</div>
	
		
			
	</div>
<a name="method_validateClassName" id="_validateClassName"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">_validateClassName</span> (line <span class="line-number"><a href="../__filesource/fsource_WSDLInterpreter__WSDLInterpreter.php.html#a164">164</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Validates a class name against PHP naming conventions and already defined  classes, and optionally stores the class as a member of the interpreted classmap.</p>
	<ul class="tags">
				<li><span class="field">return:</span> the validated version of the submitted class name</li>
				<li><span class="field">todo:</span> Add reserved keyword checks</li>
				<li><span class="field">access:</span> private</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			_validateClassName
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$className</span>, [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$addToClassMap</span> = <span class="var-default">true</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$className</span><span class="var-description">: the name of the class to test</span>			</li>
					<li>
				<span class="var-type">boolean</span>
				<span class="var-name">$addToClassMap</span><span class="var-description">: whether to add this class name to the classmap</span>			</li>
				</ul>
		
			
	</div>
<a name="method_validateNamingConvention" id="_validateNamingConvention"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">_validateNamingConvention</span> (line <span class="line-number"><a href="../__filesource/fsource_WSDLInterpreter__WSDLInterpreter.php.html#a146">146</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Validates a name against standard PHP naming conventions</p>
	<ul class="tags">
				<li><span class="field">return:</span> the validated version of the submitted name</li>
				<li><span class="field">access:</span> private</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			_validateNamingConvention
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span><span class="var-description">: the name to validate</span>			</li>
				</ul>
		
			
	</div>
<a name="method_validateType" id="_validateType"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">_validateType</span> (line <span class="line-number"><a href="../__filesource/fsource_WSDLInterpreter__WSDLInterpreter.php.html#a192">192</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Validates a wsdl type against known PHP primitive types, or otherwise  validates the namespace of the type to PHP naming conventions</p>
	<ul class="tags">
				<li><span class="field">return:</span> the validated version of the submitted type</li>
				<li><span class="field">todo:</span> Extend type handling to gracefully manage extendability of wsdl definitions, add reserved keyword checking</li>
				<li><span class="field">access:</span> private</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			_validateType
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$type</span><span class="var-description">: the type to test</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Sun, 01 Jul 2007 21:12:49 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
	</p>
	</div></body>
</html>